package com.hdax.dm.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import com.hdax.dm.item.DmCinema;
import com.hdax.dm.item.Item;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
public class IndexFloorDto{
    private Long index;
    private String itemTypeName;
    private Long itemTypeId;
    private List<FloorItems> items;
    @Data
    public static class FloorItems extends DmCinema {
        private Long id;
        private String itemName;
        @TableField("F_CREATE_TIME")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        private LocalDateTime startDate;
        @TableField("F_CREATE_TIME")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        @JsonDeserialize(using = LocalDateTimeDeserializer.class)
        @JsonSerialize(using = LocalDateTimeSerializer.class)
        private LocalDateTime endDate;
        private String imgUrl;
        private Double minPrice;

    }
}
